classdef stim
    properties
        type
        duration
    end
    methods
        function s = stim(type,duration)
            if ischar(type)
                s.type = type;
            else
                error('stim:wrongType','type needs to be a char');
            end
            if ~exist('duration','var')||isempty(duration)
                duration = Inf;
            end
            s.duration = duration;
        end
        
        function getSpatFreq(s)
            error('stim:undefinedBehavior','getSpatFreq is not defined for the abstract class. Each stim implementations should have separate methods.');
        end
    end
end